Solana Explorer
Solana has several blockchain explorers that allow you to inspect transactions, blocks, accounts, and programs. In this lab, we'll explore the three most popular Solana explorers: Solscan, Solana Explorer, and Solana Beach.
Summary
In this lab, you'll learned to:
- Navigate three major Solana explorers (Solscan, Solana Explorer, Solana Beach)
- Inspect blocks and understand Solana's slot-based system
- Analyze transactions and their multiple instructions
- Explore accounts and understand Solana's account model
- Examine programs (smart contracts) and PDAs
- Compare Solana explorers with MultiversX explorers
Solana Explorers Overview
1. Solscan
URL: solscan.io
Solscan is one of the most feature-rich Solana explorers, offering detailed transaction analysis, token tracking, and DeFi protocol insights.
Key Features:
- Transaction details and status
- Token balances and transfers
- NFT collections
- DeFi protocol interactions
- Program (smart contract) inspection
- Validator information
2. Solana Explorer (Official)
URL: explorer.solana.com
The official Solana explorer maintained by the Solana Foundation, providing core blockchain data.
Key Features:
- Clean, official interface
- Transaction and block details
- Account information
- Program inspection
- Cluster selection (Mainnet, Testnet, Devnet)
3. Solana Beach
URL: solanabeach.io
Solana Beach offers comprehensive analytics and monitoring tools for the Solana network.
Key Features:
- Network statistics
- Validator rankings
- Transaction history
- Account monitoring
- Token analytics
Exploring Blocks
Let's start by examining a recent block on Solana. Unlike MultiversX which uses shards, Solana processes transactions in a single global state.
Block Structure
Navigate to Solscan and look at the latest blocks. You'll notice:
- Slot: Solana uses slots instead of block heights. Each slot represents a time period (approximately 400ms)
- Block Height: Sequential block number
- Transactions: Number of transactions in the block
- Success Rate: Percentage of successful transactions
- Leader: The validator that produced this block
Practice: Block Inspection
- Go to Solscan Blocks and open a recent block
- Observe the following fields:
- Slot number
- Block height
- Timestamp
- Number of transactions
- Success rate
- Leader (validator) address
- Compare with a block on Solana Explorer - notice the different presentation styles
- Open the same block on Solana Beach and compare the information displayed
Exploring Transactions
Solana transactions are different from Ethereum-style transactions. They can include multiple instructions and require multiple signatures.
Transaction Structure
Let's examine a transaction. Here's an example transaction on Solana: Example Transaction on Solscan
Key Fields:
- Signature: Unique transaction identifier
- Status: Success or Failed
- Slot: The slot in which the transaction was included
- Timestamp: When the transaction was processed
- Fee: Transaction fee paid (in SOL)
- Signer(s): Account(s) that signed the transaction
- Instructions: The operations performed in this transaction
- Accounts Involved: All accounts read or written to
Transaction Types
Solana transactions can contain multiple instructions:
- Transfer: SOL or token transfers
- Program Invocation: Calls to smart contracts (programs)
- Account Creation: Creating new accounts
- Staking: Staking SOL to validators
Practice: Transaction Exploration
- Go to Solscan Transactions and open 3 different transactions
- For each transaction, identify:
- The type of transaction (transfer, program call, etc.)
- Number of instructions
- Number of signers
- Fee paid
- Status (success/failure)
- Click on one of the signer addresses to view their account details
- If the transaction involves a program, click on the program address to see program information
- Compare the same transaction across Solscan, Solana Explorer, and Solana Beach
Exploring Accounts
Solana uses an account-based model where accounts store data and code. There are different types of accounts:
Account Types
- System Accounts: Regular user accounts owned by the System Program
- Program Accounts: Accounts owned by programs (smart contracts)
- Token Accounts: Accounts holding SPL tokens
- Program Derived Addresses (PDAs): Deterministic addresses derived from programs
Account Information
When viewing an account, you'll see:
- Address: The public key of the account
- Balance: SOL balance
- Owner: The program that owns this account
- Executable: Whether this account is a program
- Rent: SOL locked for account storage
- Data: Account data (if any)
Practice: Account Analysis
- Find a transaction and click on one of the account addresses
- Examine the account details:
- Balance in SOL
- Owner program
- Whether it's executable (a program)
- Rent-exempt status
- View the transaction history for this account
- If it's a token account, identify:
- Token mint address
- Token balance
- Token owner
- Compare account views across different explorers
Exploring Programs (Smart Contracts)
Programs in Solana are executable accounts that contain smart contract code. Let's explore how to inspect programs.
Program Accounts
Program accounts are marked as "Executable" and have:
- Program ID: The address of the program
- Owner: Usually the BPF Loader or Native Loader
- Data: Program bytecode (not visible in explorers)
- Upgrade Authority: Who can upgrade the program
Program-Derived Accounts (PDAs)
Programs can create PDAs - deterministic addresses that the program controls. These are used for:
- Storing program state
- Creating unique addresses for each user/program interaction
- Managing token accounts
Practice: Program Inspection
- Find a transaction that calls a program (look for transactions with program invocations)
- Click on the program address to view program details:
- Program ID
- Owner
- Upgrade authority (if any)
- Transaction history
- Look for Program Derived Addresses (PDAs) associated with this program
- Examine the program's transaction history to understand what operations it performs
- Check if the program has a verified source code (some explorers show this)
Comparative Analysis: Solana vs MultiversX Explorers
Key Differences
| Feature | Solana | MultiversX |
|---|---|---|
| Block Structure | Slots (time-based) | Blocks with shards |
| Transaction Model | Multiple instructions per transaction | Single transaction per entry |
| Account Model | Account-based with PDAs | Account-based with shards |
| Program Storage | Programs are executable accounts | Smart contracts stored separately |
| Fee Structure | Per signature + compute units | Dynamic fees based on gas |
Practice Exercises
Exercise 1: Transaction Deep Dive
- Find a transaction that transfers SOL between two accounts
- Identify all accounts involved in the transaction
- Determine the transaction fee
- Check if the transaction was successful
- View the same transaction on all three explorers and note differences
Exercise 2: Program Analysis
- Find a transaction that invokes a program (not a simple transfer)
- Identify the program being called
- Examine the program's account details
- Look for any PDAs created or used by this program
- Review the program's recent transaction history
Exercise 3: Account Investigation
- Pick a random account address from a transaction
- View the account's current balance
- Check the account's transaction history
- Identify what type of account it is (system account, token account, program, etc.)
- If it's a token account, identify the token mint and owner
Exercise 4: Block Comparison
- Find a recent block on Solana
- Count the number of transactions
- Calculate the success rate
- Identify the validator (leader) that produced the block
- Compare this with a MultiversX block - note the structural differences
Exercise 5: Explorer Comparison
- Pick one transaction signature
- View it on Solscan, Solana Explorer, and Solana Beach
- Create a comparison table noting:
- Information displayed
- Ease of navigation
- Additional features available
- Which explorer you prefer and why
Additional Resources
- Solana Explorer Documentation
- Solscan API Documentation
- Solana Account Model
- Solana Transaction Format
- Understanding Solana Slots